home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1996 September
/
JCSM Shareware Collection (JCS Distribution) (September 1996).ISO
/
uother__
/
13030a01.ziv
/
READKEY.PWR
< prev
next >
Wrap
Text File
|
1994-05-18
|
2KB
|
92 lines
; Demo Of The Capabilities Of ReadKey
Variable InChar,1
Variable SpecInd,1
Variable ScrollLock,1,#16
Variable NumLock,1,#32
Variable CapsLock,1,#64
Variable Insert,1,#128
Variable F1,1,#59
Variable F2,1,#60
Variable F3,1,#61
Variable F4,1,#62
Variable F5,1,#63
Variable F6,1,#64
Variable F7,1,#65
Variable F8,1,#66
Variable F9,1,#67
Variable F10,1,#68
Variable F11,1,#133
Variable F12,1,#134
Variable Esc,1,#27
; which of the "lock" keys is on
Clear
ReadKey InChar,SpecInd,1,1,ScrollLock
WriteAt 1,1,'Scroll Lock.....Off'
Compare SpecInd,2,,NoLock
WriteAt 1,1,'Scroll Lock.....On '
Label NoLock
ReadKey InChar,SpecInd,1,1,NumLock
WriteAt 1,2,'NumLock.........Off'
Compare SpecInd,2,,NoNum
WriteAt 1,2,'Num Lock........On '
Label NoNum
Readkey InChar,SpecInd,1,1,CapsLock
WriteAt 1,3,'Caps Lock.......Off'
Compare SpecInd,2,,NoCaps
WriteAt 1,3,'Caps Lock.......On '
Label NoCaps
ReadKey InChar,SpecInd,1,1,Insert
WriteAt 1,4,'Insert..........Off'
Compare SpecInd,2,,NoIns
WriteAt 1,4,'Insert..........On '
Label NoIns
WriteAt 1,6,'Press any Function key...Escape ends Function key test'
ReadKey InChar,SpecInd,,1
Compare InChar,Esc,,,FTestEnd
WriteAt 1,7,'You pressed '
Compare SpecInd,1,FcnXit,FcnXit
Compare InChar,F1,ChkF2,FcnXit
WriteAt 13,7,'F1 '
Label ChkF2
Compare InChar,F2,ChkF3,FcnXit
WriteAt 13,7,'F2 '
Label ChkF3
Compare InChar,F3,ChkF4,FcnXit
WriteAt 13,7,'F3 '
Label ChkF4
Compare InChar,F4,ChkF5,FcnXit
WriteAt 13,7,'F4 '
Label ChkF5
Compare InChar,F5,ChkF6,FcnXit
WriteAt 13,7,'F5 '
Label ChkF6
Compare InChar,F6,ChkF7,FcnXit
WriteAt 13,7,'F6 '
Label ChkF7
Compare InChar,F7,ChkF8,FcnXit
WriteAt 13,7,'F7 '
Label ChkF8
Compare InChar,F8,ChkF9,FcnXit
WriteAt 13,7,'F8 '
Label ChkF9
Compare InChar,F9,ChkF10,FcnXit
WriteAt 13,7,'F9 '
Label ChkF10
Compare InChar,F10,ChkF11,FcnXit
WriteAt 13,7,'F10'
Label ChkF11
Compare InChar,F11,ChkF12,FcnXit
WriteAt 13,7,'F11'
Label ChkF12
Compare InChar,F12,FcnXit,FcnXit
WriteAt 13,7,'F12'
Label FcnXit
GoTo NoIns
Label FTestEnd
Halt